package cn.tedu.common.pojo.po;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Data
@Document(indexName = "staff")
public class StaffSearchPO implements Serializable {

    /**
     * 数据ID
     */
    @Id
    private Long id;

    /**
     * 姓名
     */
    @Field(type = FieldType.Keyword, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String username;

    /**
     * 性别
     */
    private int gender;

    /**
     * 年龄
     */
    private int age;

    /**
     * 手机号
     */
    private String phone;


    /**
     * 评价
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String comment;

    /**
     * 优秀员工
     */
    private Integer superStaff;


    /**
     * 家庭住址
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String homeAddress;
}
